using NalogGarLoader.Data;
using LinqToDB;
using NalogGarLoader.Data.Tables;

namespace NalogGarLoader.Model;

public class GarDbContext : LinqToDB.Data.DataConnection
{
    public static DataOptions? DataOptions { get; set; }

    public ITable<ImportLog> ImportLog => this.GetTable<ImportLog>();
    public ITable<CurrentVersion> CurrentVersion => this.GetTable<CurrentVersion>();

    public GarDbContext() : base(GarDbContext.DataOptions ?? new DataOptions())
    { 
        this.CommandTimeout = 60;          
    }    
}